package com.example.aerospacemanagementsystem.service.basicService.impl;

import com.example.aerospacemanagementsystem.entity.basic.Department;
import com.example.aerospacemanagementsystem.mapper.basicMapper.DepartmentMapper;
import com.example.aerospacemanagementsystem.service.basicService.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 铁殷
* @description 针对表【department】的数据库操作Service实现
* @createDate 2023-10-20 14:12:23
*/
@Service
public class DepartmentServiceImpl implements DepartmentService{

    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public int add(Department department) {
        return departmentMapper.insert(department);
    }

    @Override
    public int delete(Department department) {
        return departmentMapper.delete(department);
    }

    @Override
    public int update(Department department) {
        return departmentMapper.update(department);
    }

    @Override
    public List<Department> getAllDepartment(Department department) {
        return departmentMapper.getAllDepartment(department);
    }
}




